#include #include #include using namespace std; class LineReader { public: // return whether there's another line boolean hasNextLine (); // return the words in the next line string[] nextLineWords (); } class Record { public: // a record with no occurrences Record (string); // get the word of this record string getWord (); // add another occurrence on given line void increment (int lineNum); // e.g., "is 5: 1 2 3" string toString(); } class TreeNode { public: // a node with no occurrences TreeNode(string word, int lineNum); // insert a word on the given line into the tree void insert(string word, int lineNum); // build and return the final output string getFrequencyList(); } // construct the tree, return the alphabetized list int main () { }